package com.lam.common.components.easyexcel.handlers;

import java.util.Map;

import org.apache.poi.ss.usermodel.Row;

import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.metadata.holder.WriteTableHolder;

/**
 * 表头批注生成Handler
 * @author lam
 *
 */
public class HeadRowCommentWriteHandler extends RowCommentWriteHandler{
	
	public HeadRowCommentWriteHandler(Map<Integer, String> commentData) {
		this.commentData = commentData;
	}

	@Override
    public void afterRowDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder,
    		 Row row, Integer relativeRowIndex, Boolean isHead) {
    	if(isHead) {
            super.afterRowDispose(writeSheetHolder, writeTableHolder, row, relativeRowIndex, isHead);
        }
    }

	public HeadRowCommentWriteHandler setCommentData(Map<Integer, String> commentData) {
		this.commentData = commentData;
		return this;
	}
	
}
